unit f_config;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Buttons, ExtCtrls;

type
  Tfu_config = class(TForm)
    cb_grid: TCheckBox;
    cb_units: TCheckBox;
    cb_city: TCheckBox;
    rg: TRadioGroup;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    Label1: TLabel;
    cb_path: TCheckBox;
    cb_mo: TCheckBox;
    procedure SpeedButton2Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fu_config: Tfu_config;

implementation


uses clunit1,struct,clstruct,cldata;
{$R *.DFM}

procedure Tfu_config.SpeedButton2Click(Sender: TObject);
begin
 close;
end;

procedure Tfu_config.FormActivate(Sender: TObject);
begin
 if is_grid then cb_grid.Checked:=true else cb_grid.checked:=false;
 if nameflag then cb_city.checked:=true else cb_city.checked:=false;
 if barflag then cb_units.checked:=true else cb_units.checked:=false;
 if is_pathvis then cb_path.checked:=true else cb_path.checked:=false;
 if mouseinvert then cb_mo.checked:=true else cb_mo.checked:=false;
 rg.itemindex:=reg;
end;

procedure Tfu_config.SpeedButton1Click(Sender: TObject);
begin
 is_grid:=cb_grid.checked;
 nameflag:=cb_city.checked;
 barflag:=cb_units.checked;
 is_pathvis:=cb_path.checked;
 mouseinvert:=cb_mo.checked;
 reg:=rg.itemindex;
 close;
end;

end.
